home *** CD-ROM | disk | FTP | other *** search
Wrap
property GroupName, GroupSetting, selectedButton, default on mouseUp me setGroupValue(me) end on beginSprite me if default = 1 then sendAllSprites(#clearGroup, GroupName) set selectedButton to the spriteNum of me setGroupValue(me) else sendAllSprites(#clearGroup, GroupName) end if end on getValue me, GName if GName = the GroupName of me then dontPassEvent() return the text of member the member of sprite the selectedButton of me end if end on setValue me, GName, selected_sprite_num set MNum to the member of sprite the spriteNum of me if GName = the GroupName of me then set the hilite of member MNum to 0 set the selectedButton of me to selected_sprite_num end if end on setGroupValue me sendAllSprites(#setValue, the GroupName of me, the spriteNum of me) if the type of member the memberNum of sprite the spriteNum of me = #button then set the hilite of member the member of sprite the spriteNum of me to 1 else setValue(me, 1) end if end on clearGroup me, GName if GName = the GroupName of me then if default = 0 then set the hilite of member the member of sprite the spriteNum of me to 0 else set the hilite of member the member of sprite the spriteNum of me to 1 end if end if end on getPropertyDescriptionList return [#GroupName: [#default: #group1, #format: #symbol, #comment: "Group Name"], #default: [#default: 0, #format: #boolean, #comment: "Initially Selected?"]] end on getBehaviorDescription return "Add system button to radio button group." & RETURN & "PARAMETERS:" & RETURN & "• Group Name: Set the name of the group that this radio button belongs to. Only one member of the group will be selected." & RETURN & "• Initially Selected: If Initially Selected is checked, then this radio button will be selected on beginSprite. If more than one radio button has Initially Selected checked the highest numbered sprite will be selected. " end on getAssocMembers set myPropList to [] return myPropList end